package fr.babostesting.examples.mobile.views.pages 
{
	import com.greensock.easing.Strong;
	import com.greensock.TweenMax;
	import fr.babos.core.mvc.concrete.SpriteView;
	import fr.babos.core.mvc.concrete.View;
	import fr.babos.graphic.components.base.ComponentView;
	
	/**
	 * @author ZoulouX
	 */
	public class HomeView extends ComponentView
	{
		public function HomeView ()
		{
			
		}
		
		override public function init ():void
		{
			resizableComponent.graphics.beginFill(0xFF00FF);
			resizableComponent.graphics.drawCircle(150, 150, 100);
			resizableComponent.graphics.endFill();
		}
		
		override public function turnOn (pContextInfo:Object = null):void
		{
			TweenMax.from(resizableComponent, .5, {
				scaleX: 0,
				scaleY: 0,
				ease: Strong.easeOut,
				onComplete: dispatchEngineSignal,
				onCompleteParams: [_onTurnedOn]
			});
		}
		
		override public function turnOff (pContextInfo:Object = null):void
		{
			TweenMax.to(resizableComponent, .5, {
				scaleX: 0,
				scaleY: 0,
				ease: Strong.easeIn,
				onComplete: dispatchEngineSignal,
				onCompleteParams: [_onTurnedOff]
			});
		}
	}
}